package org.abc.fund.controller.factorController;

import org.abc.fund.service.factorService.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 系统控制器
 */
@RestController
@RequestMapping("/system")
@CrossOrigin
public class SystemController {
    @Autowired
    private SystemService systemService;
    /**
     * 获取系统统计信息
     */
    @GetMapping("/get/statistics")
    public List<Long> getStatistics() {
        try {
            List<Long> stats = systemService.getSystemStatistics();
            return stats;
        } catch (Exception error) {
            return null;
        }
    }
}